#include "../terra-ge.h"

using namespace std;

#ifndef TERRAGE_VOBJECT_H_INCLUDED
#define TERRAGE_VOBJECT_H_INCLUDED

namespace TerraGE {

    enum {
        VOBJECT_BASIC,
        VOBJECT_REGION,
        VOBJECT_COMPLEX
    };

    class VObject {
        protected:
            int type;
            float x, y, z, w, h;
            ALLEGRO_COLOR tint;
            float angle, c_x, c_y;
            ALLEGRO_BITMAP *actual_bit;
            int flags;
            bool visible;
        public:
            VObject(){}
            VObject(ALLEGRO_BITMAP *bit, float tx, float ty, float tw=0, float th=0);

            void Set_X(float v) {x=v;}
            float Get_X() {return x;}

            void Set_Y(float v) {y=v;}
            float Get_Y() {return y;}

            void Set_Z(float v) {z=v;}
            float Get_Z() {return z;}

            void Set_W(float v) {w=v;}
            float Get_W() {return w;}

            void Set_H(float v) {h=v;}
            float Get_H() {return h;}

            void Set_Angle(float v) {angle=v;}
            float Get_Angle() {return angle;}

            void Set_CX(float v) {c_x=v;}
            float Get_CX() {return c_x;}

            void Set_CY(float v) {c_y=v;}
            float Get_CY() {return c_y;}

            void Set_Flags(int v) {flags=v;}
            int Get_Flags() {return flags;}

            void Set_Tint(ALLEGRO_COLOR v) {tint=v;}
            ALLEGRO_COLOR Get_Tint() {return tint;}

            void Set_Actual_Bit(ALLEGRO_BITMAP *v) {actual_bit=v;}
            ALLEGRO_BITMAP *Get_Actual_Bit() {return actual_bit;}

            int Get_Type() {return type;}

            void Show() {visible = true;}
            void Hide() {visible = false;}
            bool Is_Visible() {return visible;}

            virtual void Update(float timestep) {}
    };
}


#endif
